// 引入工具类
import axios from '../config'

// 使用
const URL = 'api-ca' // 公共前缀地址
export const caRuleDriverList = {
	//分摊动因表单-查询
	ruleDriverQuery(data) {
		return axios.post(URL + '/ca/ruleDriver/query', data)
	},
	//分摊动因引用查看
	ruleDriverRef(data) {
		return axios.post(URL + '/ca/ruleDriver/queryRef', data);
	}, //分摊动因引用查看
	ruleDrivercheckIsRemove(data) {
		return axios.post(URL + '/ca/ruleDriver/checkIsRemove', data);
	},
	//分摊动因引用查看
	ruleDriverDelete(data) {
		return axios.post(URL + '/ca/ruleDriver/removeRuleDriver', data);
	},
	//查询动因关联的动态的数据,并返回动态数据关联的表英文名
	ruleDriverfindTableEn(data) {
		return axios.post(URL + '/ca/ruleDriver/findDriverDetail', data);
	},
	//查询表关联的维度字段，以及动态动因选择的字段数据
	ruleDriverfindColumnsEn(data) {
		return axios.post(URL + '/ca/ruleDriver/qeuryColumns', data);
	},
	//数据导出前的条件查询 根据动因编码查询动因详情	
	ruleDriverfindbyDriverCode(data) {
		return axios.post(URL + '/ca/ruleDriver/queryFilterIdForExp', data);
	},
	//根据分摊动因类型,动因数据	
	ruleDriverfindbyDriverType(data) {
		return axios.post(URL + '/ca/ruleDriver/queryForCombobox', data);
	},
	//静态数据展示	
	ruleDriverfindStaticDataCode(data) {
		return axios.post(URL + '/ca/ruleDriver/queryStaticData', data);
	},
	//保存动因的详细信息	
	ruleDriverSaveInfo(data) {
		return axios.post(URL + '/ca/ruleDriver/saveInfo', data);
	},
	//保存动因的基本信息	
	ruleDriverSaveBaseDriver(data) {
		return axios.post(URL + '/ca/ruleDriver/saveRuleDriver', data);
	},
	//查询表关联的维度字段，以及动态动因选择的字段数据	
	ruleDriverShowDataBaseDriver(data) {
		return axios.post(URL + '/ca/ruleDriver/showData', data);
	},
	//回显动因详情数据
	ruleDriverBackDataShow(data) {
		return axios.post(URL+"/ca/ruleDriver/toInfoForm",data)
	},
	// 导出分摊动因文件
	exportFile(data, loading = false) {
		return axios.exportFile(URL + '/ca/pubCaExcel/exportCaExcel', data, loading)
	},
	// 导出分摊静因文件
	exportStaticFile(data, loading = false) {
		return axios.exportFile(URL + '/ca/pubCaExcel/exportCaStaticExcel', data, loading)
	},
	// 导入分摊静因
    importStatic(data, loading = false) {
		return axios.fileUpload(URL + '/ca/ruleDriver/importFile', data, loading)
	},
	// 分摊动因名称重复校验
	checkIsExistDriverName(data) {
		return axios.post(URL + '/ca/ruleDriver/checkIsExist', data,false)
	},
	// 根据维度的code和成员的code集合查询成员的基本信息
	 ruleDriverFindDictitem(data) {
		return axios.post(URL + '/ca/ruleDriver/findDictitem', data,false)
	},

}